package heima.movie;

public class MovieOperator {

    private Movie[] movies;

    public MovieOperator(){}

    public MovieOperator(Movie[] movies){
        this.movies = movies;
    }

    public Movie searchMovieById(int id){
        for(Movie movie: movies){
            if (movie.getId() == id)
                return movie;
        }
        return null;
    }
}
